from fastapi import FastAPI
from fastapi_offline import FastAPIOffline
from core.config import settings
from core.db import init_db
from api.admin import router as admin_router

# 创建 FastAPI
app = FastAPIOffline(title="Admin Login Demo", version="0.1.0")

# 挂载路由
app.include_router(admin_router, prefix="/api")   # 统一加 /api 前缀

# 初始化 Tortoise
init_db(app)
